import request from '@/utils/request';

// 查询司机列表
export function getDriverList(query) {
  return request({
    url: `/driver?pageNum=${query.pageNum}&pageSize=${query.pageSize}`,
    method: 'post',
    data: query,
  });
}

// 查询司机详细
export function getDriver(id) {
  return request({
    url: '/driver/' + id,
    method: 'get',
  });
}

// 新增司机
export function addDriver(data) {
  return request({
    url: '/driver/add',
    method: 'post',
    data: data,
  });
}

// 修改司机
export function updateDriver(data) {
  return request({
    url: '/driver',
    method: 'put',
    data: data,
  });
}

// 删除司机
export function delDriver(id) {
  return request({
    url: '/driver?id=' + id,
    method: 'delete',
  });
}
